This invention pertains to the field of networks, and more particularly to a method and an apparatus for implementing a network protocol that supports the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of those application-usable objects therefrom.
This invention originates from a need to transmit a variable number of application-usable method parameters over a network as a single network transmittable container object from which the application-usable parameters can be re-created. Specifically, this need arises in the context of Java(copyright) programming, introduced by Sun Microsystems, Inc., where object serialization can be used to transfer objects between a client and a server for remote method invocation, amongst other functions. In Java""s object serialization, an object can be converted into a stream of data that is transmitted over a network, where the stream of data can be converted back into its original object through deserialization. Generally, data streams are transmitted in frames. In Java""s serialization, a data stream moves in frames comprising bytes, where each object is stored in an array of bytes. Serialization in the context of remote method invocation is premised on the invocation of a method which has been bound at compile-time, where a method invocation is a pre-compiled object that has been assigned to a specific, pre-determined meaning. As a result, the method invocation can be serialized and transmitted over a network as a single object, which can then be deserialized into its original method invocation object.
As disclosed in the pending U.S. Patent application cited above, however, methods can be bound at runtime instead of compile-time. Unlike compile-time method binding, however, there is no pre-compiled object, and no pre-determined meaning assigned to an event (i.e., selecting an icon or other graphical user interface to generate an event) when a method is bound at runtime. The solution to this, as discussed in the U.S. Patent application referred to herein, is to use Java""s Reflection API(copyright) (Application Programming Interface) file (hereinafter xe2x80x9cReflectionxe2x80x9d) in conjunction with a runtime method overloading resolver. Reflection comprises a number of classes that allow one to obtain information about any class and its members. (All of Java""s objects are part of a class, so Reflection classes comprise methods that can be used to obtain information about a class Circle, that defines methods and variables pertaining to a circle object, for example.)
To implement this solution, a target method (a method associated with a specific event) must be analyzed so that its method signature (method name and method parameters) can be correctly bound to a method implementation defined by a corresponding third party component. To bind a target method to a method implementation in a distributed environment, a target method""s signature must be bifurcated such that the method name is transmitted as a single object separately from the method parameters, and the method parameters are transmitted as a single object separately from the method name.
Since the method name is a single object, as there is one method name per method invocation, the method name can be transmitted over a network as a single object and then re-created back into the original method name object using Java""s serialization interface. However, if the method parameters are transmitted as a single object, there would be no effective way to re-create each parameter because the way in which the parameters are serialized does not allow deserialization to distinguish one parameter from another.
A need exists, therefore, for implementing a network protocol that supports the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of those application-usable objects therefrom.
This invention is, in general, directed to method and apparatus for implementing a network protocol that supports the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of those application-usable objects therefrom.
Thus, the invention may comprise an apparatus for implementing a network protocol to support the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of said number of application-usable objects therefrom, comprising a number of computer readable media; and computer readable program code stored on the computer readable media comprising program code for marshalling application-usable objects into marshalled objects, wherein each of the application-usable objects corresponds to a different one of the marshalled objects, and each of the marshalled objects comprises at least one frame of data; program code for creating a two-dimensional array, comprising program code for creating a first dimension array comprising a number of elements, wherein each of the elements of the first dimension array represents a given one of the marshalled objects by referencing a second dimension array comprising a number of elements; and program code for creating the second dimension array, wherein the elements of the second dimension array referenced by a given element of the first dimension array comprise frames of data of a given one of the marshalled objects; and program code for storing each of the marshalled objects in the two-dimensional array.
The invention may also comprise an apparatus for implementing a network protocol to support the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of said number of application-usable objects therefrom, comprising a number of computer readable media; and computer readable program code stored on said number of computer readable media, comprising program code for serializing the application-usable objects into serialized objects, wherein each of the application-usable objects corresponds to a different one of the serialized objects, and each of the serialized objects comprises at least one byte; program code for creating a two-dimensional array of bytes, comprising program code for creating a first dimension array comprising elements, wherein each of the elements of the first dimension array represents a given one of the serialized objects by referencing a second dimension array comprising elements; and program code for creating the second dimension array, wherein elements of the second dimension array referenced by a given element of the first dimension array comprise at least one byte of the given one of the serialized objects, whereby each of the elements of the second dimension array comprises one byte of the given one of the serialized objects; and program code for storing the given one of the serialized objects in the two-dimensional array of bytes.
The invention may also comprise a method for implementing a network protocol to support the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of said number of application-usable objects therefrom, comprising marshalling application-usable objects into marshalled objects, wherein each of the application-usable objects corresponds to a different one of the marshalled objects, and each of the marshalled objects comprises at least one frame of data; creating a two-dimensional array, comprising creating a first dimension array comprising elements, wherein each of the elements of the first dimension array represents a given one of the marshalled objects by referencing a second dimension array comprising elements; and creating the second dimension array, wherein the elements of the second dimension array referenced by the given element of the first dimension array comprise frames of data of the given one of the marshalled objects; and storing the given one of the marshalled objects in the two-dimensional array.
The invention may also comprise a method for implementing a network protocol to support the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of said number of application-usable objects therefrom, comprising creating a two-dimensional array of bytes, comprising serializing application-usable objects into serialized objects, wherein each of the application-usable objects corresponds to a different one of the serialized objects, and each of the serialized objects comprises at least one byte; creating a first dimension array comprising elements, wherein each of the elements of the first dimension array represents a given one of the serialized objects by referencing a second dimension array comprising elements; and creating the second dimension array, wherein the elements of the second dimension array referenced by the given element of the first dimension array comprise bytes of the given one of the serialized objects, whereby each of the elements of the second dimension array comprises one byte of the given one of the serialized objects; and storing the given one of the serialized objects in the two-dimensional array of bytes.
The invention may also comprise an apparatus for implementing a network protocol to support the transmission of a variable number of application-usable objects over a network as a single network transmittable container object and the re-creation of said number of application-usable objects therefrom, comprising means for marshalling said variable number of application-usable objects into a variable number of marshalled objects, wherein each of said variable number of application-usable objects corresponds to a different one of said variable number of marshalled objects, and each of said variable number of marshalled objects comprises at least one frame of data; means for creating a two-dimensional array; and means for storing said given one of said variable number of marshalled objects in said two-dimensional array.